home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-19 | 63.1 KB | 1,389 lines |
-
-
-
- MX User Commands MX
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- mx - Mouse-oriented editor for X
-
- SSYYNNOOPPSSIISS
- mmxx [_o_p_t_i_o_n_s] [_f_i_l_e _f_i_l_e _f_i_l_e ...]
- mmxxssyynncc [_o_p_t_i_o_n_s] [_f_i_l_e _f_i_l_e _f_i_l_e ...]
-
- OOPPTTIIOONNSS
- --bbdd _c_o_l_o_r Use _c_o_l_o_r as the border color for the window.
- If this switch isn't given then the bboorrddeerr--
- CCoolloorr X default is used. If it isn't given
- either, then the foreground color is used.
-
- --bbgg _c_o_l_o_r Use _c_o_l_o_r as the background color for the
- window. If this switch isn't given then the
- bbaacckkggrroouunndd X default is used. If it isn't
- given either, or if the display is a black-
- and-white one, then White is used.
-
- --DD Causes mmxx not to detach itself from its
- parent process. Useful when mmxx is invoke
- from programs that wait for it to finish,
- like mail programs. If mmxx is invoked under
- the name mmxxssyynncc then mmxx acts as if this
- switch had been given.
-
- --ddiissppllaayy _h_o_s_t::_d_i_s_p_l_a_y
- Use _h_o_s_t and _d_i_s_p_l_a_y as an indication of the |
- display on which to open the window. The |
- display defaults to the one specified in the |
- DDIISSPPLLAAYY environment variable. |
-
- --ff ||
- Treat all remaining arguments as file names. |
- This option must be used to edit a file if |
- its name starts with ``-'' or ``='' or ``+'' |
- or contains a ``:'' character.
-
- --ffgg _c_o_l_o_r Use _c_o_l_o_r as the foreground color for the
- window. If this switch isn't given then the
- ffoorreeggrroouunndd X default is used. If it isn't
- given either, or if the display is a black-
- and-white one, then Black is used.
-
- --ffnn _f_o_n_t Use _f_o_n_t as the font for the window. If this
- switch isn't given, then the ffoonntt X default
- is used as the font. If it isn't given
- either, then the Sx default font is used.
-
- --ggeeoommeettrryy _g_e_o_m_e_t_r_y
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 1
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- Use _g_e_o_m_e_t_r_y as the geometry for the window. |
- If no geometry is specified on the command |
- line, it the geometry defaults to the value |
- of the ggeeoommeettrryy X default. If no default is |
- specified, then mmxx picks a geometry. |
-
- --hheellpp ||
- Print out a list of the command-line options |
- (and brief descriptions of their functions) |
- and exit without opening a window. |
-
- --iiccoonn _f_i_l_e ||
- _F_i_l_e is the name of a file in bitmap format. |
- Read the file and use it as the icon for the |
- window. If _f_i_l_e is llooccaallhhoosstt, then mmxx |
- chooses the default icon file corresponding |
- to the local host. |
-
- --iixx _x_c_o_o_r_d ||
- Display the icon at x-coordinate _x_c_o_o_r_d. |
-
- --iiyy _y_c_o_o_r_d ||
- Display the icon at y-coordinate _y_c_o_o_r_d.
-
- --ssbb _c_o_l_o_r Use _c_o_l_o_r as the background color for the
- window's scrollbar. If this switch isn't
- given then the ssccrroollllbbaarr..bbaacckkggrroouunndd X default
- is used. If it isn't given either, then the
- background color for the text window is used.
-
- --ssff _c_o_l_o_r Use _c_o_l_o_r as the foreground color for the
- window's scrollbar. If this switch isn't
- given then the ssccrroollllbbaarr..ffoorreeggrroouunndd X default
- is used. If it isn't given either, then the
- foreground color for the text window is used.
-
- --ssee _c_o_l_o_r Use _c_o_l_o_r as the color for the window's
- scrollbar elevator. If this switch isn't
- given then the ssccrroollllbbaarr..eelleevvaattoorr X default
- is used. If it isn't given either, then the
- background color for the text window is used.
-
- --sshhoowwttiittllee Display a title bar at the top of the window. |
- Mx normally assumes that a window manager |
- will display a title bar; if your window |
- manager doesn't, you may wish to use this |
- switch. If this switch isn't specified, then |
- Mx checks for a sshhoowwTTiittllee X default; if it |
- exists and contains the string ``yes'', then |
- a title bar will be displayed.
-
- --tt _t_a_g Look up _t_a_g in the tags file of the current
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 2
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- directory, open its file in the new window,
- and go to the line of the tag.
-
- --ttbb _c_o_l_o_r Use _c_o_l_o_r as the background color for the
- window's title bar. If this switch isn't
- given then the ttiittllee..bbaacckkggrroouunndd X default is
- used. If it isn't given either, then the
- background color for the text window is used.
- This option is ignored if Mx isn't displaying
- a title bar.
-
- --ttff _c_o_l_o_r Use _c_o_l_o_r as the foreground color for the
- window's title bar. If this switch isn't
- given then the ttiittllee..ffoorreeggrroouunndd X default is
- used. If it isn't given either, then the
- foreground color for the text window is used.
- This option is ignored if Mx isn't displaying
- a title bar.
-
- --ttss _c_o_l_o_r Use _c_o_l_o_r as the color for the window's title
- stripes. If this switch isn't given then the
- itle.stripe X default is used. If it isn't
- given either, then the foreground color for
- the text window is used. This option is
- ignored if Mx isn't displaying a title bar.
-
- ++ Position the file so its last line is visible
- in the window.
-
- ++_l_i_n_e_N_u_m_b_e_r After opening the file, select the first
- character of line "_l_i_n_e_N_u_m_b_e_r and make that
- line visible in the window. For this switch,
- line 1 corresponds to the first line of the
- file.
-
- ++_s_e_a_r_c_h_P_a_t_t_e_r_n After opening the file, search for _s_e_a_r_c_h_P_a_t_-
- _t_e_r_n, just as if a sseeaarrcchh command had been
- invoked. If the first character of _s_e_a_r_-
- _c_h_P_a_t_t_e_r_n is a slash then the slash is
- ignored (this is for vi compatibility and to
- permit search patterns that begin with a
- digit).
-
- ==_g_e_o_m_e_t_r_y Use _g_e_o_m_e_t_r_y as the geometry specifier for
- the window (same effect as the --ggeeoommeettrryy
- ooppttiioonn))..
-
- _h_o_s_t:_d_i_s_p_l_a_y Use this argument to select the display on
- which to create the window (same effect as
- the --ddiissppllaayy option).
-
- _________________________________________________________________
-
-
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 3
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- IINNTTRROODDUUCCTTIIOONN
- MMxx is a mouse-oriented editor that uses the facilities of
- the X window system, the Sx supplementary library, and the
- Tcl command interpreter. It displays a window containing |
- the first _f_i_l_e argument and permits _f_i_l_e to be edited using |
- the commands defined below. If no _f_i_l_e is specified, then |
- mmxx displays a file containing a tutorial introduction to mmxx. |
- If _f_i_l_e is specified as an empty string, then mmxx creates a |
- scratch window without any particular file association. MMxx |
- normally detaches itself from its parent (as far as its |
- parent is concerned, mmxx will have exited); if the --DD switch |
- is given, or if mmxx is invoked under the name mmxxssyynncc, then mmxx |
- doesn't detach itself from its parent.
-
- Almost all mmxx actions are invoked using Tcl commands. See
- the Tcl documentation for information on the basic command
- syntax and the built-in Tcl commands. MMxx extends the Tcl
- built-in commands with additional commands for file editing;
- the mmxx commands are described in the COMMANDS section below.
- Commands may be invoked in any of three ways: the command
- subwindow, pull-down menus, and keystroke bindings. The
- command subwindow is a small entry window that is displayed
- at the bottom of the mmxx window. When it is displayed, com-
- mands may be entered there. Pull-down menus appear in a bar
- at the top of the mmxx window, and may be invoked by pressing
- a mouse button over the menu name and releasing it over an
- entry in the menu. Each menu entry has a command associated
- with it; when the entry is invoked, the command is executed
- (see the mmeennuu command for information on how to create and
- modify menus). The third command invocation mechanism is
- through keystroke bindings: certain keystrokes, or combina-
- tions of keystrokes, have commands associated with them.
- When the keystroke sequence is typed, the associated command
- is executed (see the bbiinndd command for details). For exam-
- ple, the ``a'' key is normally bound to the command iinnsseerrtt
- aa, which causes character ``a'' to be inserted at the caret
- location.
-
- Many commands may be invoked either through a menu entry or
- a keystroke binding; for these commands, the keystroke
- sequence bound to the command appears at the right side of
- the menu entry.
-
-
- ..MMXX FFIILLEESS
- After processing command line options, opening the window,
- and reading in the file, mmxx checks for the existence of a
- file ..mmxx in your home directory (which is given by the
- environment variable HOME). If the file exists, mmxx reads it
- in and processes it as a command file, just as if it were
- read with the ssoouurrccee command. Then it checks for an ..mmxx
- file in the current directory, and processes it if it
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 4
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- exists.
-
-
- CCAARREETT AANNDD SSEELLEECCTTIIOONN
- The mouse may be used to position the caret (the insertion
- point) and to select ranges of text. The same actions apply
- both to the file or to the search and command subwindows.
- Left-clicking on a character positions the caret just before
- that character. Right-clicking will select all of the char-
- acters from the caret up to and including the character
- under the pointer. If the left button is clicked twice in
- quick succession without moving the mouse, it invokes word
- selection: the word containing the character under the
- pointer is selected, the caret is positioned at the left
- side of the word, and future right clicks will select only
- full words. If the left button is triple-clicked, line
- selection will be invoked. If the control key is held down
- while left- and right-clicking, the selection will be set
- without changing the caret or input focus.
-
-
- VVAARRIIAABBLLEESS
- There are several Tcl global variables that are set or used
- by mmxx in some situations:
-
- ffiillee Set by mmxx to the name of the file loaded in the
- window (which is the first name in $$ffiilleess. |
-
- ffiilleess ||
- Set by mmxx to a list of all the _f_i_l_e arguments |
- specified on the command line that created the |
- window.
-
- ggeeoommeettrryy
- Geometry to use when creating new windows, if none
- is given as part of the ooppeenn command. See the
- ooppeenn command for details.
-
- hheeiigghhtt
- Set by mmxx to indicate the height of the window, in
- lines of text. If the last line appearing in the
- window is only partially visible, it doesn't
- count.
-
- hheellppDDiirr
- MMxx presets this variable to the location of the
- directory containing help information such as the
- tutorials.
-
- hhiissttoorryy
- MMxx automatically changes this variable on each
- mouse click to hold information about all the
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 5
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- recently-executed commands. Several of the
- default key bindings and menu entries also set
- this variable. See the HISTORY section and the
- hhiissttoorryy command for more information.
-
- nneewwWWiinnddooww
- During the ooppeenn command, mmxx sets this global vari-
- able to hold the id of the newly-created window.
-
- nnooRReeggEExxppss
- If this variable is set to ``1'', searches and
- replaces will use plain strings. By default, pat-
- tern matching takes place with vi-style regular
- expressions.
-
- rreeppllaacceeCCmmdd
- When the middle button is clicked in the
- ``Replace'' string entry, or when carriage-return
- is typed there, the contents of this variable are
- executed as a command.
-
- rreeppllaacceeSSttrriinngg
- Set by mmxx to hold the contents of the replacement
- entry subwindow.
-
- sseeaarrcchhCCmmdd
- When the middle button is clicked in the
- ``Search'' string entry, or when carriage-return
- is typed there, the contents of this variable are
- executed as a command.
-
- sseeaarrcchhSSttrriinngg
- Set by mmxx to hold the contents of the search entry
- subwindow.
-
- ttaaggFFiilleess
- List of tags files to check in ttaagg command,
- separated by white space. See the ttaagg command for
- details. This variable is read by mmxx but not
- written.
-
- vveerrssiioonn
- Set by mmxx to hold a version number in the form |
- _x._y, where changes in _x correspond to major revi- |
- sions with probable incompatibilities, and changes |
- in _y represent small bug fixes and upgrades that |
- should not cause substantial compatibility prob- |
- lems.
-
- wwiiddtthh
- The width of the window, in characters. If the
- last character position is only partially-visible,
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 6
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- then it doesn't count. If a variable-width font
- is being used, the average character size is used
- in computing the window's width.
-
-
- MMAARRKKSS
- A mark is a string that identifies a position in the file.
- It has the format
-
- _l_i_n_e.._c_h_a_r
- where _l_i_n_e is a line number in the file and _c_h_a_r is a posi-
- tion within that line. For historical reasons, lines number
- from 1 and characters number from 0.
-
- Most commands that deal with positions in the file, such as
- sseeee and ddeelleettee, take marks as arguments. Typically, marks
- are stored as the values of variables, although they may
- also be typed in directly. The mmaarrkk command provides for
- simple mark arithmetic. The position indicated in a mark
- need not actually exist in the file; at the time the mark
- is used it is rounded off to the closest actual position in
- the file. For example, if the line number doesn't exist in
- the file then it is changed to the last line; if the char-
- acter position would like off the end of the line, then it
- is rounded to the position of the last character in the
- line.
-
- When a command specifies that one of its arguments must be a
- mark, the mark may either be specified in the _l_i_n_e._c_h_a_r form
- (either directly or through command or variable substitu-
- tion), or it may be specified symbolically using one of the
- following names, which refer to special locations:
-
- bboottttoomm
- This special mark refers to the character that appears
- in the bottom left corner of the window.
-
- ccaarreett
- The special mark ccaarreett corresponds to the character
- just to the right of the caret position.
-
- cceenntteerr
- The leftmost character on the center line of the win-
- dow.
-
- eeooff The last character in the file (which is always a new-
- line character).
-
- sseell..lleefftt
- The leftmost selected character. This form of mark may
- only be used if the selection is in the file that's in
- this window.
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 7
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- sseell..rriigghhtt
- The rightmost selected character. This form of mark
- may only be used if the selection is in the file that's
- in this window.
-
- ttoopp The character that appears in the top left corner of
- the window.
-
-
- HHIISSTTOORRYY
- Under normal circumstances, MMxx continuously records all the
- top-level commands being executed, including those coming
- from keystrokes, menu entries, and the command, search, and
- replace subwindows. On each button click, undo, or search
- operation, all of the recorded commands are saved in the
- variable hhiissttoorryy and the record is cleared. Thus the hhiiss--
- ttoorryy variable describes all the commands executed between
- the last two events in the above group. It may then be
- invoked as a command to repeat recent actions.
-
- Under normal circumstances, mmxx does not record information
- about mouse clicks, searching, undoing, or hhiissttoorryy com-
- mands. In addition, changes of focus to the command,
- search, or replace subwindows are not normally recorded.
- Having these commands included in the hhiissttoorryy variable turns
- out to cause more trouble than good. However, much of this
- behavior is enforced by using the hhiissttoorryy command in the key
- bindings and menus established by the mmxx startup file, so
- you can change it if you wish. Only the mouse click
- behavior and mmxx's refusal to record hhiissttoorryy commands are
- hard-wired. See the hhiissttoorryy command for information on how
- to control command recording.
-
-
- CCOOMMMMAANNDDSS
- The mmxx built-in commands are described below. In addition
- to these commands, any of the Tcl built-in commands may also
- be used. Whenever a top-level command is invoked (i.e. in
- response to a keystroke or menu selection, as opposed to the
- execution of a command procedure), if it returns a non-empty
- result then the result is displayed in the message window.
- If the command returns an error then the error message is
- displayed in the message window.
-
- bbiinndd [_s_e_q_u_e_n_c_e [_c_o_m_m_a_n_d]]
- If the _s_e_q_u_e_n_c_e and _c_o_m_m_a_n_d arguments are given, this
- command associates the keystroke sequence _s_e_q_u_e_n_c_e with
- _c_o_m_m_a_n_d and returns an empty string. From now on,
- whenever _s_e_q_u_e_n_c_e is typed in the window, the Tcl
- interpreter will be invoked to execute _c_o_m_m_a_n_d. If
- _s_e_q_u_e_n_c_e is already bound to a command, then _c_o_m_m_a_n_d
- replaces the previous binding. If there are two bound
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 8
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- sequences of which one is a prefix of the other, then
- the shorter sequence will always match in preference to
- the longer one. If _c_o_m_m_a_n_d is an empty string, then
- the binding for _s_e_q_u_e_n_c_e (if any) is deleted, leaving
- _s_e_q_u_e_n_c_e unbound.
-
- If the first character of _c_o_m_m_a_n_d is ``!'', it signi-
- fies that no undo marks are to be generated around this
- command; the ``!'' is stripped from the command before
- executing it. If several key bindings in a row are
- invoked and each had the ``!'' prefix, then all of the
- invocations will be undone together as a single unit.
- If _c_o_m_m_a_n_d consists of nothing but the character ``@@''
- (optionally preceded by ``!''), then whenever this
- binding is invoked the command ``iinnsseerrtt _k_e_y'' will be
- executed, where _k_e_y is the last key typed on the key-
- board. ``!!@@'' is typically used as the binding for all
- the standard ASCII characters.
-
- If _c_o_m_m_a_n_d isn't specified, then the _b_i_n_d command
- returns the current binding for _s_e_q_u_e_n_c_e, or the empty
- string if there is no binding for _s_e_q_u_e_n_c_e. If neither
- _s_e_q_u_e_n_c_e or _c_o_m_m_a_n_d is given, then bbiinndd returns a Tcl
- list whose elements are the _s_e_q_u_e_n_c_es associated with
- all known keystroke bindings.
-
- ccaarreett _m_a_r_k
-
- ccaarreett ddiissppllaayy _t_y_p_e
- In the single-argument form of this command, the caret |
- is moved to just before the character at the position |
- given by _m_a_r_k. The two-argument form is used to change |
- the way the caret position is displayed. If _t_y_p_e is |
- ccaarreett, the caret position will always be marked by |
- displaying a caret just before the caret character. If |
- _t_y_p_e is bblloocckk, the caret position will be marked by |
- displaying the caret character in reverse video. If |
- _t_y_p_e is ooffff, then the caret position will not be marked |
- with any sort of special display. Finally, a _t_y_p_e of |
- vviibblloocckk marks the caret position with a block when in |
- vi mode and with a caret otherwise (this mode is only |
- relevant for ttxx). The ccaarreett command returns an empty |
- string.
-
- cclleeaann
- Pretend that the contents of this window were just
- written to disk (but don't actually write anything).
- Until the next time the file is modified, mmxx will
- assume that the window is ``clean'': if you invoke
- commands like qquuiitt or sswwiittcchh then mmxx will happily dis-
- card the contents of the window without warning you or
- giving you a chance to abort the command.
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 9
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- ccoolluummnn _m_a_r_k
- Return the column corresponding to the left edge of the
- character at the position indicated by _m_a_r_k. _M_a_r_k must
- be a valid mark. Columns are computed by treating nor-
- mal characters as one column wide, control characters
- as two columns wide, and tabs as wide enough to extend
- up to the next 8-column boundary. Character 0 of a
- line is at column 0.
-
- ccoonnttrrooll _o_p_t_i_o_n _s_t_r_i_n_g
- This command performs control-character processing on
- _s_t_r_i_n_g, depending on the value of ooppttiioonn (abbreviations
- are OK):
-
- ccoonnttrrooll bbaacckkssllaasshh _s_t_r_i_n_g
- Returns a string that is identical to _s_t_r_i_n_g
- except that non-printing characters are replaced
- with backslash sequences. The newline control
- character is replaced with \\nn, tab is replaced
- with \\tt, backspace is replaced with \\bb, and any
- other non-printing character is replaced with \\_d_d_d
- where _d_d_d gives the octal value of the character.
-
- ccoonnttrrooll bbiinnddiinngg _s_t_r_i_n_g
- This command is used primarily to produce a print-
- able description of a keystroke sequence that is
- bound to a command. It returns a string consist-
- ing of space-separated fields corresponding to the
- characters of _s_t_r_i_n_g. If a _s_t_r_i_n_g character is
- space, its corresponding field is ``SPACE''; if
- the _s_t_r_i_n_g character is a normal printing charac-
- ter then the field is just that character; if the
- _s_t_r_i_n_g character is rubout (1778) the correspond-
- ing field is ``DEL''; if the _s_t_r_i_n_g character is a
- control character, the corresponding field is of
- the form ``C-a''; if the _s_t_r_i_n_g character has its
- high-order bit set (2008), then the field is the
- same as if the high-order bit were not set, except
- that ``M-'' is prepended (3018 translates to ``M-
- A'').
-
- ccoonnttrrooll mmaakkee _s_t_r_i_n_g
- Returns a string of the same length as _s_t_r_i_n_g.
- Each character in the result is the control
- equivalent of the _s_t_r_i_n_g character (e.g., ``a''
- and ``A'' convert to control-A). The character
- ``?'' converts to rubout (1778). You may not use
- this command to generate a null character (0).
-
- ddeelleettee _m_a_r_k_1 [_m_a_r_k_2 [nnoovviieewwcchhaannggee]]
- Delete all of the characters between _m_a_r_k_1 and _m_a_r_k_2,
- inclusive. If _m_a_r_k_2 isn't specified, then delete the
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 10
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- single character at _m_a_r_k_1. Normally, this command
- changes the view in the window if necessary to ensure
- that the point of the deletion is visible; if
- nnoovviieewwcchhaannggee is specified then the view in the window
- will not be changed. Returns an empty string.
-
- eexxttrraacctt _m_a_r_k_1 [_m_a_r_k_2]
- Return as result all of the characters in the file
- between the two marks _m_a_r_k_1 and _m_a_r_k_2. If _m_a_r_k_2 is
- omitted, then return the single character at _m_a_r_k_1.
-
- ffooccuuss _w_i_n_d_o_w [cclleeaarr]
- Arrange for all future keyboard input to be directed to
- _w_i_n_d_o_w, regardless of the mouse position. _W_i_n_d_o_w must
- have one of the following values (or a unique abbrevia-
- tion for it):
-
- ccoommmmaanndd
- The command window that appears at the bottom of
- the file.
-
- ffiillee The main window, which displays the file being
- edited.
-
- rreeppllaaccee
- The replace entry, which is part of the
- search/replace window that appears just underneath
- the menu bar.
-
- sseeaarrcchh
- The search entry in the search/replace window.
-
- If _w_i_n_d_o_w isn't displayed when this command is invoked,
- mmxx displays it. Ifthe cclleeaarr option is specified (or
- any abbreviation of cclleeaarr) then the contents of the
- given window are cleared. The cclleeaarr option is ignored
- if _w_i_n_d_o_w is ffiillee. If input focussing has been dis-
- abled by the .Xdefaults file, then ffooccuuss will open
- and/or clear _w_i_n_d_o_w, but will not focus on it. Returns
- an empty string.
-
- ggeeoommeettrryy _s_p_e_c
- Set the size and/or location of the window according to
- the information in _s_p_e_c. _S_p_e_c should be in the stan-
- dard format for X geometry specifications (==8800xx2244, for
- example). Returns an empty string.
-
- hhiissttoorryy _o_p_t_i_o_n [_a_r_g]
- Control the history recording process. The exact func-
- tion depends on _o_p_t_i_o_n (which may be abbreviated
- uniquely):
-
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 11
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- hhiissttoorryy aadddd _i_n_f_o
- Append _i_n_f_o to the current history record as if it
- had been invoked as a command. Returns an empty
- string.
-
- hhiissttoorryy cclleeaarr
- Discard all of the information in the current his-
- tory record. Returns an empty string.
-
- hhiissttoorryy iiggnnoorree _c_o_m_m_a_n_d
- Execute _c_o_m_m_a_n_d but don't record it in the history
- record. Note that no hhiissttoorryy commands are ever
- recorded, even if they don't appear as the _c_o_m_m_a_n_d
- argument to hhiissttoorryy iiggnnoorree. Returns an empty
- string.
-
- hhiissttoorryy iinnffoo
- Returns the current history record, with commands
- separated by newlines.
-
- hhiissttoorryy nneexxtt _v_a_r_N_a_m_e [_c_o_m_m_a_n_d]
- Store the current history record in the variable
- _v_a_r_N_a_m_e, then clear the history record. After
- clearing the history record, if _c_o_m_m_a_n_d is speci-
- fied then execute it but don't record it. Returns
- an empty string.
-
- hhiissttoorryy ooffff
- Disable history recording. Invocations of hhiissttoorryy
- ooffff nest: recording will not resume until an
- equal number of hhiissttoorryy oonn commands have been
- invoked. Returns an empty string.
-
- hhiissttoorryy oonn
- Re-enable history recording if the cumulative
- number of hhiissttoorryy oonn commands is greater than or
- equal to the number of hhiissttoorryy ooffff commands. This
- command is ignored if history recording is already
- enabled. Returns an empty string.
-
- iinnddeenntt _m_a_r_k_1 _m_a_r_k_2 [++|--] _a_m_o_u_n_t
- Change the indentation of all the lines between _m_a_r_k_1
- and _m_a_r_k_2, inclusive. If no sign is given, then _a_m_o_u_n_t
- specifies an absolute indentation: for each of the
- lines, the indentation will be set to _a_m_o_u_n_t. If
- _a_m_o_u_n_t is preceded by a minus (plus) argument, then the
- indentation of each line will be reduced (increased) by
- _a_m_o_u_n_t units. To set the indentation for a line to _i,
- mmxx deletes all the leading blanks and tabs in the line,
- then inserts _i/8 tabs followed by (_i mod 8) spaces.
- Returns an empty string.
-
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 12
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- iinnsseerrtt _b_y_t_e_s [_m_a_r_k]
- If _m_a_r_k is specified, it contains a mark; iinnsseerrtt will
- insert the contents of the _b_y_t_e_s argument just before
- the character at position _m_a_r_k. Otherwise the command
- will insert _b_y_t_e_s at the position of the caret.
- Returns an empty string.
-
- mmaarrkk _s_r_c _o_p _a_r_g_s
- Return a position in the file in the form _l_i_n_e._c_h_a_r,
- where _l_i_n_e is a line in the file and _c_h_a_r is a charac-
- ter in the line (lines number from 1, characters from
- 0). _S_r_c must be a valid mark; the return value is com-
- puted by performing some operation on the position
- given by _s_r_c, depending on _o_p and _a_r_g_s:
-
- mmaarrkk _s_r_c
- Return the value of mark _s_r_c. This form is used
- to retrieve the value of a built-in mark such as
- sseell..lleefftt.
-
- mmaarrkk _s_r_c _d_i_r_e_c_t_i_o_n _a_m_o_u_n_t _u_n_i_t_s
- Return the position of the character _a_m_o_u_n_t _u_n_i_t_s
- away from _s_r_c. _S_r_c must be a valid mark. _D_i_r_e_c_-
- _t_i_o_n must be ffoorrwwaarrdd or bbaacckkwwaarrdd; it indicates
- which direction to move from _s_r_c. _A_m_o_u_n_t is a
- decimal number indicating how far to move, and
- _u_n_i_t_s indicates the units for motion: cchhaarrss,
- wwoorrddss, or lliinneess. For example, mmaarrkk $$bb ffoorrwwaarrdd 11
- wwoorrdd will set variable aa to point to the beginning
- of the word just after the one containing the
- position indicated by variable bb.
-
- mmaarrkk _s_r_c cchhaarr _i_n_d_e_x
- Return the position of the _i_n_d_e_x'th character in
- the line given by _s_r_c. If _i_n_d_e_x is -1, then _d_s_t
- will refer to the last character on _s_r_c's line.
-
- mmaarrkk _s_r_c ccoolluummnn _i_n_d_e_x
- Return the position of the character that covers
- column _i_n_d_e_x on the line containing _s_r_c. Columns
- are computed by treating normal characters as one
- space wide, control characters as two spaces wide,
- tabs as wide enough to extend up to the next 8-
- column boundary, and the newline at the end of the
- line as infinitely wide. Columns number from 0.
-
- mmaarrkk _s_r_c lliinnee _i_n_d_e_x
- Return the position whose line number is _i_n_d_e_x but
- whose character position is the same as _s_r_c's.
-
- mmaarrkk _s_r_c ppaarreenntthheessiiss [_v_a_r_N_a_m_e]
- Return the position of the first character of the
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 13
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- parenthesis that matches the one pointed to by
- _s_r_c. If _s_r_c doesn't point to a parenthesis, then
- return _s_r_c. If _v_a_r_N_a_m_e is specified, then it
- names a variable that is set to refer to the last
- character of the matching parenthesis (this
- feature is only useful for parentheses that are
- more than one character long).
-
- mmaarrkk _s_r_c sseeaarrcchh _d_i_r_e_c_t_i_o_n _p_a_t_t_e_r_n [_v_a_r_N_a_m_e]
- Search for _p_a_t_t_e_r_n and return the position of the
- first character of the matching range. If _v_a_r_N_a_m_e
- is given, it names a variable that is set to the
- last character of the matching range. The search
- starts at the position given by _s_r_c and continues
- in _d_i_r_e_c_t_i_o_n, which must be either ffoorrwwaarrdd or
- bbaacckkwwaarrdd. The search is circular: if a forward
- search reaches the end of the file then it contin-
- ues at the beginning; if a backward search
- reaches the beginning of the file then it contin-
- ues at the end. If no match is found, then _s_r_c is
- returned (and stored in the variable named by _v_a_r_-
- _N_a_m_e, if specified).
-
- mmeennuu _o_p_t_i_o_n [args]
- The mmeennuu command is used to manipulate the pull-down
- menus displayed at the top of the window. It has
- several forms, depending on _o_p_t_i_o_n:
-
- mmeennuu aappppeenndd _n_a_m_e _l_e_f_t_T_e_x_t _c_e_n_t_e_r_T_e_x_t _r_i_g_h_t_T_e_x_t _c_o_l_o_r _c_m_d
- Append a new entry onto menu _n_a_m_e, which must
- already exist. The _l_e_f_t_T_e_x_t, _c_e_n_t_e_r_T_e_x_t, and
- _r_i_g_h_t_T_e_x_t arguments give strings to be displayed
- left-justified, centered, and right-justified
- (respectively) in the menu entry. If any of the
- arguments is an empty string or the single charac-
- ter ``-'', then no text is displayed in that posi-
- tion. _C_o_l_o_r gives the background color to use for
- the entry; if it is an empty string or ``-'' then
- the standard background color for the window is
- used. _C_m_d is a command to invoke whenever the
- menu entry is invoked. Returns an empty string.
-
- _l_e_f_t_T_e_x_t ...
- mmeennuu ccrreeaattee _n_a_m_e _l_e_f_t_T_e_x_t _c_e_n_t_e_r_T_e_x_t _r_i_g_h_t_T_e_x_t _c_o_l_o_r _c_m_d
- Create a new menu, which will be displayed to the
- right of any existing menus in the menu bar. The
- new menu's name will be _n_a_m_e. If there is already
- a menu named _n_a_m_e, then it will be replaced (the
- new menu will occupy the same position in the menu
- bar as the old menu). Following the _n_a_m_e argument
- are any number of groups of five arguments, with
- each group describing one entry in the new menu
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 14
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- from top down. The five arguments for each menu
- entry have the same meaning as for mmeennuu aappppeenndd.
- Returns an empty string.
-
- mmeennuu ddeelleettee _n_a_m_e
- Delete the menu named _n_a_m_e and return an empty
- string.
-
- mmeennuu iinnffoo
- Return a Tcl list whose entries are the names of
- the menus for this window, in order.
-
- mmeennuu iinnffoo _n_a_m_e
- Returns a Tcl list containing information about
- menu _n_a_m_e. Each entry in the list corresponds to
- one entry in the menu, in order from top down.
- Each entry is itself a Tcl list with four entries,
- which are the _l_e_f_t_T_e_x_t, _c_e_n_t_e_r_T_e_x_t, _r_i_g_h_t_T_e_x_t, and
- _c_m_d values from mmeennuu ccrreeaattee or mmeennuu aappppeenndd.
-
- _c_o_l_o_r _c_m_d
- mmeennuu mmooddiiffyy _n_a_m_e _e_n_t_r_y_I_n_d_e_x _l_e_f_t_T_e_x_t _c_e_n_t_e_r_T_e_x_t _r_i_g_h_t_T_e_x_t
- Change the _e_n_t_r_y_I_n_d_e_x'th entry in menu _n_a_m_e as
- indicated by arguments _l_e_f_t_T_e_x_t through _c_m_d. Each
- of these five arguments has the same meaning as in
- mmeennuu aappppeenndd. Entry 0 is the topmost entry in the
- menu. Returns an empty string.
-
- mmeessssaaggee _s_t_r_i_n_g ||
- Display _s_t_r_i_n_g in the message subwindow.
-
- nneewwlliinnee
- Insert a newline character at the position of the
- caret, and adjust indentation. If the caret's initial
- line consists of nothing but space, then all the space
- on the line is deleted. If the caret's initial line
- contains leading space, it is reorganized to consist of
- zero or more tabs followed by zero or more space char-
- acters, such that the total width of white space is the
- same after the change as before (a tab counts for eight
- characters). Tabs and spaces are inserted on the
- caret's new line to match the indentation of the
- caret's initial line.
-
- ooppeenn [_o_p_t_i_o_n_s] _f_i_l_e _f_i_l_e ...
- Open a new window. _O_p_t_i_o_n_s and _f_i_l_e arguments are |
- treated just the same as they are treated on the com- |
- mand line, except for the following exceptions. The --DD |
- option is not permitted, nor are options that specify a |
- display. If _f_i_l_e is not specified, a new window is |
- opened on the same file as the current window. If no |
- geometry specification is given in _o_p_t_i_o_n_s, then mmxx |
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 15
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- uses the contents of the global variable ggeeoommeettrryy as a |
- default geometry; if no ggeeoommeettrryy variable exists, then |
- mmxx picks a default geometry. Other options, such as |
- foreground color and font, default to the values from |
- the invoking window, rather than looking for X |
- defaults. OOppeenn sets the global variable nneewwWWiinnddooww in |
- the invoking window to hold the id of the newly-created |
- window. This may be used in conjunction with the sseenndd |
- command to issue commands to the new window. The |
- return value is always an empty string.
-
- qquuiitt Destroy the window. If this is the last remaining win-
- dow on its file and if the file has been modified since
- the last time it was written, then the user is notified
- and given a chance to save the file or abort the com-
- mand. This command always returns an error, in order
- to abort any partially-executed commands that are in
- progress (execution of further commands on the window
- could cause a core dump).
-
- qquuoottee
- Quote the next input character. The mapping for the |
- next character will be ignored and the character will |
- be inserted. The return value is always an empty |
- string.
-
- rreeaadd _f_i_l_e
- Read _f_i_l_e and insert its contents just before the
- caret.
-
- rreeppllaaccee [_o_p_t_i_o_n _a_r_g_s]
- Replace the selection, as determined by _o_p_t_i_o_n and
- _a_r_g_s:
-
- rreeppllaaccee
- If no _o_p_t_i_o_n is given, then replace the selection
- by the value of the rreeppllaacceeSSttrriinngg global variable.
- If the search subwindow isn't visible, don't do
- any replacement but open the search subwindow and
- focus input on the replacement string entry.
-
- rreeppllaaccee rraannggee _s_t_a_r_t _s_t_o_p [_p_a_t_t_e_r_n _s_t_r_i_n_g]
- Search the range of text between the marks _s_t_a_r_t
- and _s_t_o_p, inclusive for occurrences of _p_a_t_t_e_r_n.
- Replace each occurrence with _s_t_r_i_n_g. If _p_a_t_t_e_r_n
- and _s_t_r_i_n_g aren't specified, then they are taken
- from the sseeaarrcchhSSttrriinngg and rreeppllaacceeSSttrriinngg global
- variables. If the search subwindow isn't visible,
- don't do any replacement but open the search
- subwindow and focus input on the replacement
- string entry. By default, vi-style regular |
- expressions are used for the pattern and |
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 16
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- replacement strings. If the variable ``noRe- |
- gExps'' is set to ``1'', only simple matching is |
- done: there are no wild cards. Matches must be |
- within a single line of the file.
-
- rreeppllaaccee sseelleeccttiioonn _s_t_r_i_n_g
- Delete the selection and insert _s_t_r_i_n_g in its
- place.
- The rreeppllaaccee command always returns an empty string.
-
- rreesseett
- Discard the version of the file that is currently |
- loaded in memory and re-load the file from its disk |
- version. Any changes that have been made since the |
- last time the file was saved will be lost (but you'll |
- be warned in this case and given a chance to skip the |
- command). This command will affect all of the windows |
- open on the file.
-
- sseeaarrcchh [_d_i_r_e_c_t_i_o_n [_p_a_t_t_e_r_n]]
- Search for a pattern. The search starts from the
- beginning of the selection (if there is a selection in
- the window's file), or from the caret if there's no
- selection. _D_i_r_e_c_t_i_o_n indicates which direction to
- search, and must be either ffoorrwwaarrdd or bbaacckkwwaarrdd. If
- omitted, it defaults to ffoorrwwaarrdd. _P_a_t_t_e_r_n gives a text
- string to search for; if not given, it defaults to the
- global variable sseeaarrcchhSSttrriinngg. If the search subwindow
- isn't visible, don't do any searching but open the
- search subwindow and focus input on the search string
- entry. By default, vi-style regular expressions are |
- used for the pattern and replacement strings. If the |
- variable ``noRegExps'' is set to ``1'', only simple |
- matching is done: there are no wild cards. Matches |
- must be within a single line of the file. If a match
- is found, the matching range is selected and the caret
- is set to the beginning of the range. Returns an empty
- string.
-
- sseeee _m_a_r_k [[ttoopp|cceenntteerr|bboottttoomm]
- Adjust the view in the window so that the character at
- _m_a_r_k is visible in the window. If a ttoopp or cceenntteerr or
- bboottttoomm option is given, then the mark will appear at
- the given position in the window. If no position is
- given, then mmxx will check to see if _m_a_r_k is already
- visible. If so, it does nothing. If not, it will
- center _m_a_r_k in the window. Returns an empty string.
-
- sseelleeccttiioonn _o_p_t_i_o_n [_a_r_g ...]
- This command performs one of several selection-related
- operations, depending on _o_p_t_i_o_n:
-
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 17
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- sseelleeccttiioonn
-
- sseelleeccttiioonn ggeett
- If sseelleeccttiioonn is invoked with no _o_p_t_i_o_n, or if
- _o_p_t_i_o_n is ggeett, then the command returns the con-
- tents of the selection. An error occurs if
- there's nothing selected. The command sseelleeccttiioonn
- is different from the command _e_x_t_r_a_c_t _s_e_l._l_e_f_t
- _s_e_l._r_i_g_h_t: sseelleeccttiioonn will return the contents of
- the selection even if the selection is in another
- window, but eexxttrraacctt sseell..lleefftt sseell..rriigghhtt can only
- return information from this window.
-
- sseelleeccttiioonn cclleeaarr
- If there is something selected in this window, the |
- selection is cleared, so nothing will be selected. |
- If there is nothing selected in this window, there |
- is no effect. Returns an empty string.
-
- sseelleeccttiioonn hheerree
- Returns 11 if there is something selected in the
- file in this window. Returns 00 if there is no
- selection or if the selection is not in this
- window's file.
-
- sseelleeccttiioonn sseett _m_a_r_k_1 [_m_a_r_k_2]
- Change the selection to consist of the characters
- between _m_a_r_k_1 and _m_a_r_k_2, inclusive. If _m_a_r_k_2
- isn't specified, then select the single character
- at _m_a_r_k_1. Returns an empty string.
-
- sseenndd _w_i_n_d_o_w _c_o_m_m_a_n_d
- _W_i_n_d_o_w must be the id of another window owned by this
- mmxx process (such as a value placed in nneewwWWiinnddooww by
- ooppeenn). The sseenndd command will invoke the Tcl inter-
- preter to process _c_o_m_m_a_n_d in the context of _w_i_n_d_o_w,
- rather than the window from which the sseenndd command was
- issued. SSeenndd will return the result of executing _c_o_m_-
- _m_a_n_d in _w_i_n_d_o_w.
-
- sswwiittcchh _f_i_l_e_N_a_m_e
- Change the window to display _f_i_l_e_N_a_m_e instead of what's
- there currently. If the file currently in the window
- has been modified, and if this is the only window on
- the file, then a notifier is popped up to warn the user
- and give him/her a chance to abort the command.
-
- ttaaggiinnffoo _n_a_m_e
- Look up _n_a_m_e in the tags file(s). If it is found, then
- return a Tcl list whose first element is the file con-
- taining _n_a_m_e and whose second element is a search pat-
- tern identifying the tag's location in the file. If
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 18
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- the global variable ttaaggFFiilleess is defined, it must con-
- tain a list of tags files to check. Those files will
- be checked for _n_a_m_e in order. If no ttaaggFFiilleess variable
- exists, then the file ttaaggss in the current directory is
- searched.
-
- uunnddoo [mmoorree]
-
- uunnddoo rreeccoovveerr _f_i_l_e_N_a_m_e
- Undo recent edits. If uunnddoo is invoked without any
- arguments, the most recent modification to the file is
- undone; multiple invocations will toggle the change.
- If the mmoorree argument is given, successive undo's work
- back through history; successive uunnddoo mmoorree commands
- will undo every change back to the beginning of the
- edit session. Modifications are undone in groups del-
- imited by marks in an undo log; normally, a mark is
- placed in the log before and after each user-invoked
- action (button click, menu selection, or keystroke)
- that modifies the file. Exceptions to this rule occur
- for keystrokes whose bindings have the ``!'' prefix:
- no marks are placed in the log for these actions.
- Returns an empty string. If the rreeccoovveerr option is
- given, then _f_i_l_e_N_a_m_e must be the address of a mmxx log.
- This command will read _f_i_l_e_N_a_m_e, which describes
- changes made in a previous edit session, and apply
- those changes to the current file.
-
- uuppddaattee
- Force the screen to get updated. Normally the screen
- is updated only at the end of processing a command,
- just before waiting for more input from the user. This
- command will force any pending redisplays to be per-
- formed immediately. It's used mostly for debugging.
- Returns an empty string.
-
- wwrriittee [_f_i_l_e_N_a_m_e]
- Write the file to disk. If _f_i_l_e_N_a_m_e is given then the
- file is written there; otherwise it is written to the
- place from which it was read (i.e. the name displayed
- in the window's title bar). Returns a message contain-
- ing the file's name and number of lines.
-
-
- CCOOMMMMAANNDD PPRROOCCEEDDUURREESS
- In addition to the built-in commands described above, a
- number of Tcl command procedures are created by the default
- mmxx startup file. They may be invoked just like built-in
- commands, and are described below.
-
- ccaarreettiinnffoo
- Returns a string containing information about the
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 19
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- file's length and the position of the caret.
-
- lliinnee _i
- Selects line number _i and adjusts the view in the win-
- dow so that the line number is visible. Returns an
- empty string.
-
- mmoovvee This command moves the contents of the selection to the
- caret position. Returns an empty string.
-
- nneexxtt This command switches to the next _f_i_l_e of those speci- |
- fied on the command line by deleting the first element |
- of the variable $$ffiilleess and switching the window to the |
- new first element of $$ffiilleess.
-
- sshhoowwBBiinnddiinnggss _b_i_n_d_i_n_g _b_i_n_d_i_n_g ...
- Open a scratch window and display information about
- keystroke bindings in it. If no _b_i_n_d_i_n_g argument is
- given, then display information about all of the keys-
- troke bindings that are currently defined. If one or
- more _b_i_n_d_i_n_g arguments are given, then just display
- information for the given bindings. Returns an empty
- string.
-
- sshhoowwMMeennuuss _n_a_m_e _n_a_m_e ...
- Open a scratch window and display information about
- menus in it. If no _n_a_m_e argument is given, then
- display information for all the menus that are
- currently defined. If one or more _n_a_m_e arguments are
- given, then just display information for the named
- menus. Returns an empty string.
-
- sshhoowwPPrrooccss _n_a_m_e _n_a_m_e ...
- Open a scratch window and display procedure information
- in it. If no _n_a_m_e argument is given, then display
- information about all the procedures that are currently
- defined. If one or more _n_a_m_e arguments are given, then
- just display information for the named procedures.
- Returns an empty string.
-
- sshhoowwVVaarrss _n_a_m_e _n_a_m_e ...
- Open a scratch window and display variable values in |
- it. If no _n_a_m_e argument is given, then display the |
- values of all variables known in the context of the |
- caller of sshhoowwVVaarrss. If one or more _n_a_m_e arguments are |
- given, then just show the values of those variables. |
- Returns an empty string.
-
- ttaagg _n_a_m_e
- Invoke the ttaaggiinnffoo command to look up _n_a_m_e, then open a
- new window on its file, select the definition of _n_a_m_e,
- and make the selected line visible in the new window.
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 20
-
-
-
-
-
-
- MX User Commands MX
-
-
-
- Returns an empty string.
-
- wwhheerree
- Open a scratch window and display information about |
- where the last error occurred. The error information |
- is taken from the eerrrroorrIInnffoo global variable.
-
-
- CCOOMMMMAANNDD SSUUBBWWIINNDDOOWW
- The command subwindow allows commands to be typed in
- directly, instead of invoking them through keystroke bind-
- ings or menus. When active, it appears at the bottom of the
- mmxx window. It can be activated with the ccoommmmaanndd or ffooccuuss
- commands. Commands may be entered and edited in the command
- subwindow, and are invoked by typing carriage-return or by
- middle-clicking in the window. When a command is invoked,
- it is not deleted from the command subwindow, in order to
- permit it to be re-invoked easily. The command window is
- de-activated by typing ^^QQ in it.
-
-
- SSEEAARRCCHH SSUUBBWWIINNDDOOWW
- The search subwindow is used to enter search and replacement
- strings. When active, it appears at the top of the mmxx win-
- dow, just underneath the menu bar. If it isn't active and a
- search or replacement command is invoked that requires one
- of its entries, then the window is activated. It may also
- be activated using the ffooccuuss command. The top entry in the
- window is used to enter a search pattern and the bottom
- entry is used to enter a replacement string. The values of
- these two entries are always available in the sseeaarrcchhSSttrriinngg
- and rreeppllaacceeSSttrriinngg global variables, respectively. If
- carriage-return is typed in the ``Search:'' entry, or if the
- middle mouse button is clicked in the entry, then the the
- contents of the global variable sseeaarrcchhCCmmdd are invoked as a
- Tcl command. If carriage-return is typed in the
- ``Replace:'' entry, or if it is middle-buttoned, then the
- contents of the global variable rreeppllaacceeCCmmdd are invoked as a
- Tcl command. The search subwindow can be deactivated by
- typing ^^QQ in it.
-
-
- KKEEYYWWOORRDDSS
- editor, mouse, window
-
-
-
-
-
-
-
-
-
-
-
- Sprite v.1.0 Printed: April 19, 1990 21
-
-
-
-